Update to rust master
authorDavid Davidović <geosoft.corp@gmail.com>
Tue, 23 Dec 2014 02:15:56 +0000 (03:15 +0100)
committerDavid Davidović <geosoft.corp@gmail.com>
Tue, 23 Dec 2014 02:15:56 +0000 (03:15 +0100)
rust-lang/rust#19253 and rust-lang/rust@25f8051 have introduced changes
to the namespacing within the std::collections::hash_map, breaking some
of Cargo code which imported these.

rust-lang/rust@cf350ea, implementing changes proposed by RFC #344, have
also broken some code which relies on hash_set::SetItems (now renamed to
hash_set::Iter).

This commit fixes the incompatibilities: imports of
std::collections::hash_map::{Occupied, Vacant} have been replaced by
imports of std::collections::hash_map::Entry::{Occupied, Vacant} and one
instance where the SetItems has been used was replaced by the proper
usage of Iter.

src/cargo/core/registry.rs
src/cargo/core/resolver/mod.rs
src/cargo/ops/cargo_rustc/context.rs
src/cargo/ops/cargo_rustc/fingerprint.rs
src/cargo/ops/cargo_rustc/job_queue.rs
src/cargo/util/config.rs
src/cargo/util/dependency_queue.rs
src/cargo/util/graph.rs

index ab64c622c683b2faf431c1af89b6ad209980052a..0b199db66f2e337144de896dbc216ac627878a46 100644 (file)
@@ -1,5 +1,6 @@
 use std::collections::HashSet;
-use std::collections::hash_map::{HashMap, Occupied, Vacant};
+use std::collections::hash_map::HashMap;
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 
 use core::{Source, SourceId, SourceMap, Summary, Dependency, PackageId, Package};
 use util::{CargoResult, ChainError, Config, human, profile};
index 1318a9ec30d34bb1fead48b7d97f4e57af4e3a3e..1a1f9423c1377eaf964dab1c5a9d240e8eecb83b 100644 (file)
@@ -1,6 +1,7 @@
 use std::cell::RefCell;
 use std::collections::HashSet;
-use std::collections::hash_map::{HashMap, Occupied, Vacant};
+use std::collections::hash_map::HashMap;
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::fmt;
 use std::rc::Rc;
 use semver;
index 468b4f136327c9be752738b8fab66ef28d80426b..70ce7f2637985ed20159de9fecf7b4e4c0db002d 100644 (file)
@@ -1,4 +1,5 @@
-use std::collections::hash_map::{HashMap, Occupied, Vacant};
+use std::collections::hash_map::HashMap;
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::str;
 use std::sync::Arc;
 
index 1075f8b7fb23e916946da5a0b2ec2cf2a614c59b..edcd30dd9b7150b12e9234f788e8df2a3982a477 100644 (file)
@@ -1,4 +1,4 @@
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::hash::{Hash, Hasher};
 use std::hash::sip::SipHasher;
 use std::io::{mod, fs, File, BufferedReader};
index 07ddf302c8760b52c14b3424b6e1e55d7230aaeb..41f6d172323a86ea50c59c075976aca41445d5f3 100644 (file)
@@ -1,5 +1,6 @@
 use std::collections::HashSet;
-use std::collections::hash_map::{HashMap, Occupied, Vacant};
+use std::collections::hash_map::HashMap;
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::sync::TaskPool;
 use term::color::YELLOW;
 
index a796bb38099312af0402a62bb9b6bff642dc794b..8d000b6413cec9c69563f49a474ca8ef9515e771 100644 (file)
@@ -1,6 +1,7 @@
 use std::{fmt, os, mem};
 use std::cell::{RefCell, RefMut};
-use std::collections::hash_map::{HashMap, Occupied, Vacant};
+use std::collections::hash_map::{HashMap};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::io;
 use std::io::fs::{mod, PathExtensions, File};
 use std::string;
index 8e868b4a4133f50260d37a19f88ff87f9a88a467..266071233eb8fd82f3643be6b3cd0575b4c8631a 100644 (file)
@@ -4,8 +4,9 @@
 //! This structure is used to store the dependency graph and dynamically update
 //! it to figure out when a dependency should be built.
 
-use std::collections::{HashMap, HashSet};
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_set::HashSet;
+use std::collections::hash_map::HashMap;
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::hash::Hash;
 
 pub use self::Freshness::{Fresh, Dirty};
index b797cb3dda6c46ed2cf667d227f8f4810339a731..b5f4a6335ccd24e31fa912123f24aca22111b00a 100644 (file)
@@ -1,8 +1,9 @@
 use std::fmt;
 use std::hash::Hash;
-use std::collections::{HashMap, HashSet};
-use std::collections::hash_map::{Keys, Occupied, Vacant};
-use std::collections::hash_set::SetItems;
+use std::collections::hash_set::HashSet;
+use std::collections::hash_map::{HashMap, Keys};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
+use std::collections::hash_set::Iter;
 
 pub struct Graph<N> {
     nodes: HashMap<N, HashSet<N>>
@@ -14,7 +15,7 @@ enum Mark {
 }
 
 pub type Nodes<'a, N> = Keys<'a, N, HashSet<N>>;
-pub type Edges<'a, N> = SetItems<'a, N>;
+pub type Edges<'a, N> = Iter<'a, N>;
 
 impl<N: Eq + Hash + Clone> Graph<N> {
     pub fn new() -> Graph<N> {